package com.example.data;

public class ContactData {
	public String firstName;
	public String lastName;
	public String address;
	public String homeTel;
	public String mobileTel;
	public String workTel;
	public String email1;
	public String email2;
	public String day;
	public String month;
	public String year;
	public String address2;
	public String home2;
	public String id;
	public GroupData group;

	public String getId() {
		return id;
	}
	public ContactData setId(String id) {
		this.id = id;
		return this;
	}
	public String getFirstName() {
		return firstName;
	}
	public ContactData setFirstName(String firstName) {
		this.firstName = firstName;
		return this;
	}
	public String getLastName() {
		return lastName;
	}
	public ContactData setLastName(String lastName) {
		this.lastName = lastName;
		return this;
	}
	public ContactData setAddress(String address) {
		this.address = address;
		return this;
	}
	public ContactData setHomeTel(String homeTel) {
		this.homeTel = homeTel;
		return this;
	}
	public ContactData setMobileTel(String mobileTel) {
		this.mobileTel = mobileTel;
		return this;
	}
	public ContactData setWorkTel(String workTel) {
		this.workTel = workTel;
		return this;
	}
	public ContactData setEmail1(String email1) {
		this.email1 = email1;
		return this;
	}
	public ContactData setEmail2(String email2) {
		this.email2 = email2;
		return this;
	}
	public ContactData setDay(String day) {
		this.day = day;
		return this;
	}
	public ContactData setMonth(String month) {
		this.month = month;
		return this;
	}
	public ContactData setYear(String year) {
		this.year = year;
		return this;
	}
	public ContactData setAddress2(String address2) {
		this.address2 = address2;
		return this;
	}
	public ContactData setHome2(String home2) {
		this.home2 = home2;
		return this;
	}
	public ContactData setGroup(GroupData group) {
		this.group = group;
		return this;
	}
	@Override
	public String toString() {
		return "ContactData [id=" + id + "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((firstName == null) ? 0 : firstName.hashCode());
		result = prime * result
				+ ((lastName == null) ? 0 : lastName.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactData other = (ContactData) obj;
		if (firstName == null) {
			if (other.firstName != null)
				return false;
		} else if (!firstName.equals(other.firstName))
			return false;
		if (lastName == null) {
			if (other.lastName != null)
				return false;
		} else if (!lastName.equals(other.lastName))
			return false;
		if (id != null && other.id != null) 
			return id.equals(other.id);
		return true;
	}
	
}



